<template>
  <div class="open-container">
    <div class="image-content">
      <img :src="openImgData.picturePath" alt="" />
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="onCancel">关 闭</el-button>
    </span>
  </div>
</template>

<script>
export default {
  name: "OpenView",
  props: {
    dialogVisibleUse: {
      type: Boolean,
      default: false,
    },
    openImgData: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  components: {},
  data() {
    return {};
  },
  methods: {
    // 提交给接口并重置
    onSubmit() {
      this.$emit("update:dialogVisibleUse", false);
    },
    // 关闭弹框并重置数据
    onCancel() {
      this.$emit("update:dialogVisibleUse", false);
    },
  },
};
</script>

<style scoped lang="scss">
.open-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  .image-content {
    img {
      width: 100%;
      height: 100%;
    }
  }
  .dialog-footer {
    margin-top: 20px;
  }
}
</style>
